<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>虫情检测</title>
    <link rel="stylesheet" href="../css/theme.css">
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/pest-detection.css">
    <link rel="stylesheet" href="../layui-v2.8.17/layui/css/layui.css" />
</head>
<body>
    <header class="common-header"></header>

    <main>
        <!-- 查询条件区域 -->
        <div class="search-container">
            <div class="search-form">
                <div class="search-row">
                    <div class="search-item">
                        <label for="start-date">开始时间:</label>
                        <input type="datetime-local" id="start-date" class="search-input">
                    </div>
                    <div class="search-item">
                        <label for="end-date">结束时间:</label>
                        <input type="datetime-local" id="end-date" class="search-input">
                    </div>
<!--                    <div class="search-item">-->
<!--                        <label for="channel-select">设备通道:</label>-->
<!--                        <select id="channel-select" class="search-select">-->
<!--                            <option value="">全部通道</option>-->
<!--                            <option value="0">通道1</option>-->
<!--                            <option value="1">通道2</option>-->
<!--                            <option value="2">通道3</option>-->
<!--                            <option value="3">通道4</option>-->
<!--                            <option value="4">通道5</option>-->
<!--                        </select>-->
<!--                    </div>-->
                    <div class="search-item">
                        <label for="detection-status">识别状态:</label>
                        <select id="detection-status" class="search-select">
                            <option value="">全部状态</option>
                            <option value="detected">已识别虫害</option>
                            <option value="not-detected">未识别虫害</option>
                        </select>
                    </div>
                    <div class="search-item">
                        <label for="pest-type-select">虫类筛选:</label>
                        <select id="pest-type-select" class="search-select">
                            <option value="">所有虫类</option>
                            <!-- Options will be dynamically populated by JavaScript -->
                        </select>
                    </div>
                    <div class="search-item search-buttons">
                        <button id="search-btn" class="search-btn">查询</button>
                        <button id="reset-btn" class="reset-btn">重置</button>
                    </div>
                </div>
            </div>
        </div>

        <div class="pest-history-container">
            <div id="history-grid" class="history-grid">
                <!-- Pest history cards will be dynamically inserted here -->
            </div>
            <div id="pest-history-pagination" class="pagination-container"></div>
        </div>
    </main>

    <!-- 图片查看模态框 -->
    <div id="image-modal" class="image-modal">
        <div class="modal-image-container">
            <div class="close-modal">&times;</div>
            <img id="modal-image" class="modal-image" src="" alt="害虫大图">
        </div>
    </div>

    <script src="../lib/jquery.js"></script>
    <script src="../layui-v2.8.17/layui/layui.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/android-interface.js"></script>
    <script src="../js/mock/mock-pest-data.js"></script>
    <script src="../js/widgets.js"></script>
    <script src="../js/pest-detection.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Initialize the common header
            initCommonHeader('虫情检测', true);
        });
    </script>
</body>
</html> 